package com.ease.dao;

import com.ease.actionscript.Remoting;
import com.ease.common.util.OrderingUtil;
import com.ease.common.vo.Ordering;
import com.ease.model.Model;

/**
 * 
 * @author nathanleewei
 * 
 */
public interface DataAccessObjectConst {

	int MAX_ROWS = 1500;

	int MAXIMUM_NUMBER_OF_EXPRESSIONS_USING_IN_CLAUSE = 990;// 1000

	String DOT = ".";

	//
	String REFERENCE_SUFFIX = "_ID";

	//
	String CRITERIA = "_criteria";

	//
	String COUNT = "_count";

	String SKIP_RESULTS = "_skipResult";

	String MAX_RESULTS = "_maxResult";

	String ORDER_BY = "_orderBy";

	//
	int RAW_SKIP_RESULT = -1;

	int RAW_MAX_RESULT = -1;

	// statement
	String STATEMENT_SEQUENCE = "sequence";

	String STATEMENT_FIND_ALL = "findAll";

	String STATEMENT_FIND_BY_ID = "findById";

	String STATEMENT_FIND_BY_IDS = "findByIds";

	String STATEMENT_CREATE = "create";

	String STATEMENT_UPDATE = "update";

	String STATEMENT_DELETE = "remove";

	String STATEMENT_FIND = "find";

	String STATEMENT_FIND_COUNT = "find_count";

	/**
	 * ORDER BY NAME
	 */
	@Remoting(false)
	Ordering Ordering_Name = new Ordering(Model.Column_NAME);

	/**
	 * ORDER BY LENGTH(NAME), NAME
	 */
	@Remoting(false)
	Ordering Ordering_NameLengthAndName = OrderingUtil.length(Model.Column_NAME).addAsc(Model.Column_NAME);

}
